package org.delphy.indy2.containers.carbonFireworksBoxClasses
{
	import com.roguedevelopment.pulse.emitter.BitmapEmitter;
	
	import flash.display.BitmapData;
	import flash.events.Event;
	import flash.filters.ColorMatrixFilter;

	public class CarbonBitmapEmitter extends BitmapEmitter
	{
		
		private var fadeAmount:Number;
		
		public function CarbonBitmapEmitter(arg0:Number, arg1:BitmapData, arg2:Number=0.85)
		{
			super(arg0, arg1, arg2);
			
			fadeAmount=arg2;
		}
		
		override protected function onEnterFrame(arg0:Event):void{
			fader=new ColorMatrixFilter([0, 0, 0, 0, 0,
		  		    		  			 0, Math.random(), 0, 0, 0,
		 					  			 0, 0, Math.random(), 0, 0,
							  			 0, 0, 0, fadeAmount, 0]);
			
			super.onEnterFrame(arg0);
		}
		
	}
}